import React, { Component } from 'react';
import Swiper from 'swiper'
import 'swiper/css/swiper.css'
class Banner extends Component {
    componentDidMount(){
        new Swiper('.swiper',{
            loop:true,
            autoplay:true
        })
    }
    render() {
        return (
            <div className='Banner'>
                <div className="swiper">
                    <div className="swiper-wrapper">
                        {
                            this.props.list.map((item,index)=>{
                                return (
                                    <div key={index} className="swiper-slide">
                                        <img src={item} alt="" />
                                    </div>
                                )
                            })
                        }
                        
                    </div>
                </div>
            </div>
        );
    }
}

export default Banner;